package com.springlearn.springsourcecode.chap13;

import java.lang.reflect.Method;

/**
 * @author wtcode
 * @Description
 * @date 2025/4/5 - 14:57
 */
public class TestMethodInvoke {

    public static void main(String[] args) throws Exception{
        Method foo = TestMethodInvoke.class.getMethod("foo", int.class);
        for (int i = 0; i < 17; i++) {
            show(i,foo);
            foo.invoke(null,i);
        }
        System.in.read();
    }


    // 方法反射调用时，底层MethodAccessor 的实现类
    private static void show(int i, Method foo) throws Exception{

    }


    public static void foo(int i){
        System.out.println(i + ":" + "foo");
    }
}
